/* Turska UI library
 * Copyright 2003-2008 Jetro Lauha
 * All rights reserved.
 * Web: http://iki.fi/jetro/ or http://jet.ro
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of EITHER:
 *   (1) The GNU Lesser General Public License as published by the Free
 *       Software Foundation; either version 2.1 of the License, or (at
 *       your option) any later version. The text of the GNU Lesser
 *       General Public License is included with this library in the
 *       file LICENSE-LGPL.txt.
 *   (2) The BSD-style license that is included with this library in
 *       the file LICENSE-BSD.txt.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
 * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
 *
 * $Id: UIFontIrr.h,v 1.2 2008/03/27 11:44:22 tonic Exp $
 * $Revision: 1.2 $
 */

#ifndef UIFONTIRR_H_INCLUDED
#define UIFONTIRR_H_INCLUDED


//! \todo Brief comment.
/*! \todo Implementation documentation with explanation of font image contents.
 */
class UIFontIrr : public UIFont
{
public:

    //! Constructs a new font object.
    /*! The alphaTraceMinAlpha parameter is minimum alpha value to be traced
     *  as a visible pixel. It is ignored if the image surface lacks alpha.
     */
    UIFontIrr(UIGraphicsIrr *graphics, const char *fileName, const char *fontString = NULL,
              UINT8 alphaTraceMinAlpha = 16);
    virtual ~UIFontIrr();

    virtual BOOL init();

    virtual BOOL reload();

    virtual FLOAT getStringWidth(const char *string, FLOAT scale);

    virtual void drawString(FLOAT x, FLOAT y, UINT32 flags, const char *string,
                            FLOAT red = 1, FLOAT green = 1, FLOAT blue = 1, FLOAT alpha = 1, FLOAT scale = 1);

    virtual void drawString(FLOAT x, FLOAT y, UINT32 flags, const char *string, const FLOAT *color, FLOAT scale = 1);

protected:

    UIGraphicsIrr *mGraphics;

    UINT8 mAlphaTraceMinAlpha;
};


#endif // !UIFONTIRR_H_INCLUDED
